const BaseService = require('./BaseService.js');

class AreaService extends BaseService {
  constructor() {
    super();
    this.currentTableName = this.tableMap.area_info;
  }
  /**
   * @description 根据parentId查询下面的结构
   * @param {number} parentId 父级的id
   * @returns {Promise<[]>} 返回查询的结果
   */
  findListByParentId(parentId) {
    let strSql = ` select * from ${this.currentTableName} where parentId = ? `;
    return this.executeSql(strSql, [parentId]);
  }
}

module.exports = AreaService;
